package com.pqtest.api.service;

import com.pqtest.api.entity.PqCsTestItemEntity;
import com.pqtest.api.mapper.PqCsTestItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CsTestItemService {
    @Autowired
    PqCsTestItemMapper pqCsTestItemMapper;

    @Cacheable(value = "testitem",key="#p0",unless = "#result == null")
    public PqCsTestItemEntity getById(int id){
        return pqCsTestItemMapper.getById(id);
    }
    //取消某个item id的所有收藏设置
    public void disCollectItem(){

    }

    public List<PqCsTestItemEntity> search( String body){
        return pqCsTestItemMapper.search(body);
    }
}
